package com.test.mess;

import lombok.extern.slf4j.Slf4j;
import org.springframework.retry.support.RetryTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@Slf4j
public class RetryService {
    @Resource(name = "countRetryTemplate")
    private RetryTemplate countRetryTemplate;

    public void retry() {
        countRetryTemplate.execute((retryContext) -> {
            log.info("retryContext={}", retryContext);
            return null;
        });
    }

}
